const {override, fixBabelImports, addLessLoader} = require('customize-cra');

module.exports = override(
  //针对antd实现按需打包：根据import来打包(使用babel-plugin-import插件)
  fixBabelImports("import", {
    libraryName: "antd",
    libraryDirectory: "es",
    style: true, //自动打包相关的样式
  }),
  // 使用less-loader对源码中的less变量进行覆盖  
  addLessLoader({
    javascriptEnabled: true,
    modifyVars: { "@primary-color": "#FFC0CB" },
  })
);
